Skip to content

Add more linters#2092

Merged
lucacome merged 6 commits into
nginx:mainfrom
lucacome:chore/more-linters
Jun 27, 2024
Merged

Add more linters#2092
lucacome merged 6 commits into
nginx:mainfrom
lucacome:chore/more-linters

Conversation

@lucacome
Copy link
Copy Markdown
Contributor

@lucacome lucacome commented Jun 5, 2024

Proposed changes

Problem: We want to catch errors and styling issues as early as possible.

Solution: Enable new linters.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

Release notes

If this PR introduces a change that affects users and needs to be mentioned in the release notes,
please add a brief note that summarizes the change.

NONE

@lucacome lucacome requested a review from a team as a code owner June 5, 2024 02:59
@github-actions github-actions Bot added the chore Pull requests for routine tasks label Jun 5, 2024
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 87.59%. Comparing base (97fb223) to head (f773879).

Files Patch % Lines
internal/framework/controller/reconciler.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2092      +/-   ##
==========================================
- Coverage   87.61%   87.59%   -0.03%     
==========================================
  Files          96       96              
  Lines        6695     6698       +3     
  Branches       50       50              
==========================================
+ Hits         5866     5867       +1     
- Misses        773      774       +1     
- Partials       56       57       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread internal/framework/controller/reconciler.go
Comment thread internal/mode/static/state/dataplane/configuration.go
@lucacome
Copy link
Copy Markdown
Contributor Author

lucacome commented Jun 5, 2024

Also wondering what you think about the suggested preallocs

@lucacome lucacome self-assigned this Jun 6, 2024
@kate-osborn
Copy link
Copy Markdown
Contributor

Also wondering what you think about the suggested preallocs

I'm fine with it. It will be a good reminder for us to try and preallocate when the capacity can be determined, which is in our coding guidelines.

Comment thread apis/v1alpha1/clientsettingspolicy_types.go
Comment thread internal/framework/controller/reconciler.go
Comment thread internal/mode/static/state/dataplane/configuration.go
@lucacome lucacome requested a review from a team as a code owner June 26, 2024 22:43
@github-actions github-actions Bot added the documentation Improvements or additions to documentation label Jun 26, 2024
@lucacome
Copy link
Copy Markdown
Contributor Author

I've decided to open a sepate PR for forcetypeassert and prealloc since this is already changing 54 files and those are not trivial changes.

@lucacome lucacome requested review from a team and kate-osborn June 26, 2024 23:17
Comment thread internal/mode/static/manager.go
Comment thread .github/workflows/ci.yml
Comment thread internal/mode/static/manager.go
lucacome added 6 commits June 27, 2024 12:47
Problem: We want to catch errors and styling issues as early as
possible.

Solution: Enable new linters.
@lucacome lucacome enabled auto-merge (squash) June 27, 2024 20:03
@lucacome lucacome merged commit d540f36 into nginx:main Jun 27, 2024
@lucacome lucacome deleted the chore/more-linters branch June 27, 2024 20:32
miledxz added a commit to miledxz/nginx-gateway-fabric that referenced this pull request Jan 14, 2025
Problem: We want to catch errors and styling issues as early as
possible.

Solution: Enable new linters.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Pull requests for routine tasks documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants